xend: Only import OpenSSL package when it is required.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 6 May 2008 14:31:15 +0000 (15:31 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 6 May 2008 14:31:15 +0000 (15:31 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/python/xen/web/tcp.py

index f444c208d35d2ff5c4e48c88fec260a225cbc5c2..0ffb3fb0dbb767437bdc660abc562b7c5b077226 100644 (file)
@@ -22,8 +22,6 @@ import re
 import socket
 import time
 
-from OpenSSL import SSL
-
 import connection
 
 from xen.xend.XendLogging import log
@@ -82,6 +80,7 @@ class SSLTCPListener(TCPListener):
 
 
     def createSocket(self):
+        from OpenSSL import SSL
         # make a SSL socket
         ctx = SSL.Context(SSL.SSLv23_METHOD)
         ctx.set_options(SSL.OP_NO_SSLv2)